import json


class Json_Tool:
    @staticmethod
    def is_json(data):
        try:
            data_type = type(data)
            if data_type == str:
                json.loads(data)
            else:
                return False
        except ValueError:
            return False
        return True

    @staticmethod
    def object_to_json(data):
        data_json = json.dumps(data)
        return data_json

    @staticmethod
    def json_to_object(data):
        data_obj = json.loads(data)
        return data_obj
